#!/bin/bash
BASENAME=$(basename $0)
CURDIR=$(echo $0 | sed "s/${BASENAME}//g")
source /home/burzum/Documents/Projects/keys-logs/env

export DISPLAY=:0 
mkdir -p ${SCREENSDIR}/${DDATE}

fswebcam -d ${CAMDEV} -S 2 -F 3 -r ${RESOL} -q ${SCREENSDIR}/${DDATE}/webshot-${DATE}.jpg

curl -X POST -F "file=@${SCREENSDIR}/${DDATE}/webshot-${DATE}.jpg" -F "ddate=${DDATE}" -F "date=${DATE}" -F "type=webshot" ${POSTURL}/upload.php